package com.xinnet.mms.allot.service.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xinnet.core.utils.page.PageView;
import com.xinnet.mms.allot.dao.CustomAllotConfigCheckDao;
import com.xinnet.mms.allot.service.CustomAllotConfigCheckService;
import com.xinnet.mms.entity.CustomAllotConfigDept;
import com.xinnet.mms.entity.Dept;

@Service("allotConfigCheckService")
public class CustomAllotConfigCheckServiceImpl implements CustomAllotConfigCheckService {

	@Autowired
	CustomAllotConfigCheckDao allotConfigCheckDao;
	
	/**分页查询在审核状态的客户分配设置*/
	@Override
	public PageView<CustomAllotConfigDept> queryAllotConfigCheck(PageView<CustomAllotConfigDept> pageView) throws SQLException {
		return allotConfigCheckDao.queryAllotConfigCheck(pageView);
	}
	
	public List<CustomAllotConfigDept> getAllotConfigCheck(String deptIdStr) throws SQLException {
		return allotConfigCheckDao.getAllotConfigCheck(deptIdStr);
	}

	/**通过组织结构名称过滤审核状态的客户分配设置*/
	@Override
	public PageView<CustomAllotConfigDept> queryAllotConfigCheckByDname(PageView<CustomAllotConfigDept> pageView, Dept dept) throws SQLException {
		return allotConfigCheckDao.queryAllotConfigCheckByDname(pageView, dept);
	}

	/**根据部门ID将分配设置设置为启用*/
	@Override
	public void updateAllotConfigCheckResultYes(String deptno) throws SQLException {
		allotConfigCheckDao.updateAllotConfigCheckResultYes(deptno);
	}

	/**根据部门ID将分配设置设置为拒绝*/
	@Override
	public void updateAllotConfigCheckResultNo(String deptno) throws SQLException {
		allotConfigCheckDao.updateAllotConfigCheckResultNo(deptno);
	}

}
